import request from '@/utils/request'
// 更新浏览记录、点赞记录
export function updateInformationRecord(id,data) {
    return request({
        url: '/api/information/update/record/'+id,
        method: 'put',
        data: data
    })
}
// 查询列表
export function findAllInformation(query) {
    return request({
        url: '/api/information/list',
        method: 'post',
        data: query
    })
}
// 查询详情
export function getInformation(id) {
    return request({
        url: '/api/information/' + id,
        method: 'get'
    })
}

// 新增
export function addInformation(data) {
    return request({
        url: '/api/information/',
        method: 'post',
        data: data
    })
}

// 修改
export function updateInformation(id,data) {
    return request({
        url: '/api/information/update/'+id,
        method: 'put',
        data: data
    })
}

// 删除
export function delInformation(id) {
    return request({
        url: `/api/information/${id}/off`,
        method: 'DELETE'
    })
}